import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/subwayst/swStPlanYear/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/subwayst/swStPlanYear/',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/subwayst/swStPlanYear/' + id,
    method: 'get'
  })
}

export function getDetail(id) {
  return request({
    url: `/subwayst/swStPlanYear/${id}/planMonth`,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/subwayst/swStPlanYear/' + id,
    method: 'delete'
  })
}

export function delBatch(ids) {
  return request({
    url: '/subwayst/swStPlanYear/delBatch',
    method: 'delete',
    data:ids
  })
}

export function putObj(obj) {
  return request({
    url: '/subwayst/swStPlanYear/',
    method: 'put',
    data: obj
  })
}

export function auditObj(obj) {
  return request({
    url: '/subwayst/swStPlanYear/audit',
    method: 'put',
    data: obj
  })
}

export function submit(obj) {
  return request({
    url: '/subwayst/swStPlanYear/submit',
    method: 'put',
    data: obj
  })
}

export function exportExcel(query) {
  return request({
    url: '/subwayst/swStPlanYear/export',
    method: 'get',
    responseType:'blob',
    params: query
  })
}
